package com.seeTools.next.conf;

import org.springframework.stereotype.Component;

/**
 * 租户ID线程本地holder
 *
 * @author xiaotong
 */
@Component
public class ThreadLocalHolder {

    private static final ThreadLocal<Long> tenantIdThreadLocal = new ThreadLocal<>();

    public static Long getTenantId() {
        return tenantIdThreadLocal.get();
    }

    public static void setTenantId(Long tenantId) {
        tenantIdThreadLocal.set(tenantId);
    }
}
